package com.ywl.designpattern.builder;

public class BuilderDemo {

    public static void main(String[] args) {
        ComputerBuilder builder = new ConcreteComputerBuilder();
        Director director = new Director(builder);

        // 构建游戏PC
        director.constructGamingPC();
        Computer gamingPC = builder.getResult();
        System.out.println("gamingPC = " + gamingPC);

        // 构建办公PC
        director.constructOfficePC();
        Computer officePC = builder.getResult();
        System.out.println("officePC = " + officePC);
    }
}
